package com.ideal.frame.sys.controller;

import com.ideal.frame.common.dto.ResponseModel;
import com.ideal.frame.sys.service.SysIndustryClassificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/sys/classification")
@Api(tags = "省市区地址")
@AllArgsConstructor
public class SysIndustryClassificationController {

    private final SysIndustryClassificationService sysIndustryClassificationService;

    @ApiOperation(value = "国民经济行业分类", httpMethod = "GET", produces = "application/json", response = ResponseModel.class)
    @GetMapping("listIndustryClassification/{id}")
    public ResponseModel listSysAddress(@PathVariable("id") Long id) {
        return ResponseModel.success(sysIndustryClassificationService.listIndustryClassification(id));
    }
}
